<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 's_grade.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body leftmargin="2" topmargin="2" >

			<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
			
				<tr bgcolor="#E7E7E7">
					<td height="14" colspan="6" align='center'>&nbsp;${username}的成绩单如下：&nbsp;</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">
					<td width="25%">课程名</td>
					<td width="25%">教师名称</td>
					<td width="25%">课程学分</td>
					<td width="25%">分数</td>
		        </tr>	
				<c:forEach items="${grade}" var="s">
				<tr align='center' bgcolor="#FFFFFF" height="22">
					<td bgcolor="#FFFFFF" align="center">
					    ${s.c_name}
					</td>
					<td bgcolor="#FFFFFF" align="center">
					   ${s.teacher}
					</td>
					<td bgcolor="#FFFFFF" align="center">
					    ${s.score}
					</td>
					<td bgcolor="#FFFFFF" align="center">
					    ${s.grade}
					</td>
					
				</tr>
				</c:forEach>
			</table>
  </body>
</html>
